package com.dingzhen.controller;

import com.dingzhen.entity.Topic;
import com.dingzhen.service.EatService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author dingzhen
 */
@RestController
public class EatController {
    @Resource
    private EatService eatService;

    @PostMapping("eat")
    public String eat(@RequestBody Topic topic){
        return eatService.eat(topic);
    }
}
